3.59 \(\int (a+b \tan (e+f x)) (c+d \tan (e+f x))^2 (A+B \tan (e+f x)+C \tan ^2(e+f x)) \, dx\)
Optimal. Leaf size=266 \[ -\frac {\log (\cos (e+f x)) \left (A \left (2 a c d+b \left (c^2-d^2\right )\right )+a \left (B c^2-B d^2-2 c C d\right )-b \left (2 B c d+c^2 C-C d^2\right )\right )}{f}-x \left (a \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )+b \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )\right )+\frac {(a B+A b-b C) (c+d \tan (e+f x))^2}{2 f}+\frac {d \tan (e+f x) (a A d+a B c-a C d+A b c-b B d-b c C)}{f}-\frac {(-4 a C d-4 b B d+b c C) (c+d \tan (e+f x))^3}{12 d^2 f}+\frac {b C \tan (e+f x) (c+d \tan (e+f x))^3}{4 d f} \]
[Out]
-(a*(c^2*C+2*B*c*d-C*d^2-A*(c^2-d^2))+b*(2*c*(A-C)*d+B*(c^2-d^2)))*x-(a*(B*c^2-B*d^2-2*C*c*d)-b*(2*B*c*d+C*c^2
-C*d^2)+A*(2*a*c*d+b*(c^2-d^2)))*ln(cos(f*x+e))/f+d*(A*a*d+A*b*c+B*a*c-B*b*d-C*a*d-C*b*c)*tan(f*x+e)/f+1/2*(A*
b+B*a-C*b)*(c+d*tan(f*x+e))^2/f-1/12*(-4*B*b*d-4*C*a*d+C*b*c)*(c+d*tan(f*x+e))^3/d^2/f+1/4*b*C*tan(f*x+e)*(c+d
*tan(f*x+e))^3/d/f
________________________________________________________________________________________
Rubi [A] time = 0.47, antiderivative size = 264, normalized size of antiderivative = 0.99,
number of steps used = 5, number of rules used = 5, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.116, Rules used =
{3637, 3630, 3528, 3525, 3475} \[ -\frac {\log (\cos (e+f x)) \left (2 a A c d+a B \left (c^2-d^2\right )-2 a c C d+A b \left (c^2-d^2\right )-b \left (2 B c d+c^2 C-C d^2\right )\right )}{f}-x \left (a \left (-A \left (c^2-d^2\right )+2 B c d+c^2 C-C d^2\right )+b \left (2 c d (A-C)+B \left (c^2-d^2\right )\right )\right )+\frac {(a B+A b-b C) (c+d \tan (e+f x))^2}{2 f}+\frac {d \tan (e+f x) (a A d+a B c-a C d+A b c-b B d-b c C)}{f}-\frac {(-4 a C d-4 b B d+b c C) (c+d \tan (e+f x))^3}{12 d^2 f}+\frac {b C \tan (e+f x) (c+d \tan (e+f x))^3}{4 d f} \]
Antiderivative was successfully verified.
[In]
Int[(a + b*Tan[e + f*x])*(c + d*Tan[e + f*x])^2*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2),x]
[Out]
-((a*(c^2*C + 2*B*c*d - C*d^2 - A*(c^2 - d^2)) + b*(2*c*(A - C)*d + B*(c^2 - d^2)))*x) - ((2*a*A*c*d - 2*a*c*C
*d + A*b*(c^2 - d^2) + a*B*(c^2 - d^2) - b*(c^2*C + 2*B*c*d - C*d^2))*Log[Cos[e + f*x]])/f + (d*(A*b*c + a*B*c
- b*c*C + a*A*d - b*B*d - a*C*d)*Tan[e + f*x])/f + ((A*b + a*B - b*C)*(c + d*Tan[e + f*x])^2)/(2*f) - ((b*c*C
- 4*b*B*d - 4*a*C*d)*(c + d*Tan[e + f*x])^3)/(12*d^2*f) + (b*C*Tan[e + f*x]*(c + d*Tan[e + f*x])^3)/(4*d*f)
Rule 3475
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]
Rule 3525
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(a*c - b
*d)*x, x] + (Dist[b*c + a*d, Int[Tan[e + f*x], x], x] + Simp[(b*d*Tan[e + f*x])/f, x]) /; FreeQ[{a, b, c, d, e
, f}, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]
Rule 3528
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(d
*(a + b*Tan[e + f*x])^m)/(f*m), x] + Int[(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x
], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]
Rule 3630
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (
f_.)*(x_)]^2), x_Symbol] :> Simp[(C*(a + b*Tan[e + f*x])^(m + 1))/(b*f*(m + 1)), x] + Int[(a + b*Tan[e + f*x])
^m*Simp[A - C + B*Tan[e + f*x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && NeQ[A*b^2 - a*b*B + a^2*C, 0]
&& !LeQ[m, -1]
Rule 3637
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)*tan[(e
_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(b*C*Tan[e + f*x]*(c + d*Tan[e + f*x])
^(n + 1))/(d*f*(n + 2)), x] - Dist[1/(d*(n + 2)), Int[(c + d*Tan[e + f*x])^n*Simp[b*c*C - a*A*d*(n + 2) - (A*b
+ a*B - b*C)*d*(n + 2)*Tan[e + f*x] - (a*C*d*(n + 2) - b*(c*C - B*d*(n + 2)))*Tan[e + f*x]^2, x], x], x] /; F
reeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[c^2 + d^2, 0] && !LtQ[n, -1]
Rubi steps
\begin {align*} \int (a+b \tan (e+f x)) (c+d \tan (e+f x))^2 \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right ) \, dx &=\frac {b C \tan (e+f x) (c+d \tan (e+f x))^3}{4 d f}-\frac {\int (c+d \tan (e+f x))^2 \left (b c C-4 a A d-4 (A b+a B-b C) d \tan (e+f x)+(b c C-4 b B d-4 a C d) \tan ^2(e+f x)\right ) \, dx}{4 d}\\ &=-\frac {(b c C-4 b B d-4 a C d) (c+d \tan (e+f x))^3}{12 d^2 f}+\frac {b C \tan (e+f x) (c+d \tan (e+f x))^3}{4 d f}-\frac {\int (c+d \tan (e+f x))^2 (4 (b B-a (A-C)) d-4 (A b+a B-b C) d \tan (e+f x)) \, dx}{4 d}\\ &=\frac {(A b+a B-b C) (c+d \tan (e+f x))^2}{2 f}-\frac {(b c C-4 b B d-4 a C d) (c+d \tan (e+f x))^3}{12 d^2 f}+\frac {b C \tan (e+f x) (c+d \tan (e+f x))^3}{4 d f}-\frac {\int (c+d \tan (e+f x)) (4 d (b B c+b (A-C) d-a (A c-c C-B d))-4 d (A b c+a B c-b c C+a A d-b B d-a C d) \tan (e+f x)) \, dx}{4 d}\\ &=-\left (a \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )+b \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right ) x+\frac {d (A b c+a B c-b c C+a A d-b B d-a C d) \tan (e+f x)}{f}+\frac {(A b+a B-b C) (c+d \tan (e+f x))^2}{2 f}-\frac {(b c C-4 b B d-4 a C d) (c+d \tan (e+f x))^3}{12 d^2 f}+\frac {b C \tan (e+f x) (c+d \tan (e+f x))^3}{4 d f}-\left (-2 a A c d+2 a c C d-A b \left (c^2-d^2\right )-a B \left (c^2-d^2\right )+b \left (c^2 C+2 B c d-C d^2\right )\right ) \int \tan (e+f x) \, dx\\ &=-\left (a \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )+b \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right ) x-\frac {\left (2 a A c d-2 a c C d+A b \left (c^2-d^2\right )+a B \left (c^2-d^2\right )-b \left (c^2 C+2 B c d-C d^2\right )\right ) \log (\cos (e+f x))}{f}+\frac {d (A b c+a B c-b c C+a A d-b B d-a C d) \tan (e+f x)}{f}+\frac {(A b+a B-b C) (c+d \tan (e+f x))^2}{2 f}-\frac {(b c C-4 b B d-4 a C d) (c+d \tan (e+f x))^3}{12 d^2 f}+\frac {b C \tan (e+f x) (c+d \tan (e+f x))^3}{4 d f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 2.89, size = 241, normalized size = 0.91 \[ \frac {6 (-a A d+a B c+a C d+A b c+b B d-b c C) \left (-2 d^2 \tan (e+f x)+i \left ((c+i d)^2 \log (-\tan (e+f x)+i)-(c-i d)^2 \log (\tan (e+f x)+i)\right )\right )+6 (a B+A b-b C) \left (6 c d^2 \tan (e+f x)+(-d+i c)^3 \log (-\tan (e+f x)+i)-(d+i c)^3 \log (\tan (e+f x)+i)+d^3 \tan ^2(e+f x)\right )+\frac {(4 a C d+4 b B d-b c C) (c+d \tan (e+f x))^3}{d}+3 b C \tan (e+f x) (c+d \tan (e+f x))^3}{12 d f} \]
Antiderivative was successfully verified.
[In]
Integrate[(a + b*Tan[e + f*x])*(c + d*Tan[e + f*x])^2*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2),x]
[Out]
(((-(b*c*C) + 4*b*B*d + 4*a*C*d)*(c + d*Tan[e + f*x])^3)/d + 3*b*C*Tan[e + f*x]*(c + d*Tan[e + f*x])^3 + 6*(A*
b*c + a*B*c - b*c*C - a*A*d + b*B*d + a*C*d)*(I*((c + I*d)^2*Log[I - Tan[e + f*x]] - (c - I*d)^2*Log[I + Tan[e
+ f*x]]) - 2*d^2*Tan[e + f*x]) + 6*(A*b + a*B - b*C)*((I*c - d)^3*Log[I - Tan[e + f*x]] - (I*c + d)^3*Log[I +
Tan[e + f*x]] + 6*c*d^2*Tan[e + f*x] + d^3*Tan[e + f*x]^2))/(12*d*f)
________________________________________________________________________________________
fricas [A] time = 0.60, size = 259, normalized size = 0.97 \[ \frac {3 \, C b d^{2} \tan \left (f x + e\right )^{4} + 4 \, {\left (2 \, C b c d + {\left (C a + B b\right )} d^{2}\right )} \tan \left (f x + e\right )^{3} + 12 \, {\left ({\left ({\left (A - C\right )} a - B b\right )} c^{2} - 2 \, {\left (B a + {\left (A - C\right )} b\right )} c d - {\left ({\left (A - C\right )} a - B b\right )} d^{2}\right )} f x + 6 \, {\left (C b c^{2} + 2 \, {\left (C a + B b\right )} c d + {\left (B a + {\left (A - C\right )} b\right )} d^{2}\right )} \tan \left (f x + e\right )^{2} - 6 \, {\left ({\left (B a + {\left (A - C\right )} b\right )} c^{2} + 2 \, {\left ({\left (A - C\right )} a - B b\right )} c d - {\left (B a + {\left (A - C\right )} b\right )} d^{2}\right )} \log \left (\frac {1}{\tan \left (f x + e\right )^{2} + 1}\right ) + 12 \, {\left ({\left (C a + B b\right )} c^{2} + 2 \, {\left (B a + {\left (A - C\right )} b\right )} c d + {\left ({\left (A - C\right )} a - B b\right )} d^{2}\right )} \tan \left (f x + e\right )}{12 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((a+b*tan(f*x+e))*(c+d*tan(f*x+e))^2*(A+B*tan(f*x+e)+C*tan(f*x+e)^2),x, algorithm="fricas")
[Out]
1/12*(3*C*b*d^2*tan(f*x + e)^4 + 4*(2*C*b*c*d + (C*a + B*b)*d^2)*tan(f*x + e)^3 + 12*(((A - C)*a - B*b)*c^2 -
2*(B*a + (A - C)*b)*c*d - ((A - C)*a - B*b)*d^2)*f*x + 6*(C*b*c^2 + 2*(C*a + B*b)*c*d + (B*a + (A - C)*b)*d^2)
*tan(f*x + e)^2 - 6*((B*a + (A - C)*b)*c^2 + 2*((A - C)*a - B*b)*c*d - (B*a + (A - C)*b)*d^2)*log(1/(tan(f*x +
e)^2 + 1)) + 12*((C*a + B*b)*c^2 + 2*(B*a + (A - C)*b)*c*d + ((A - C)*a - B*b)*d^2)*tan(f*x + e))/f
________________________________________________________________________________________
giac [B] time = 33.12, size = 6502, normalized size = 24.44 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((a+b*tan(f*x+e))*(c+d*tan(f*x+e))^2*(A+B*tan(f*x+e)+C*tan(f*x+e)^2),x, algorithm="giac")
[Out]
1/12*(12*A*a*c^2*f*x*tan(f*x)^4*tan(e)^4 - 12*C*a*c^2*f*x*tan(f*x)^4*tan(e)^4 - 12*B*b*c^2*f*x*tan(f*x)^4*tan(
e)^4 - 24*B*a*c*d*f*x*tan(f*x)^4*tan(e)^4 - 24*A*b*c*d*f*x*tan(f*x)^4*tan(e)^4 + 24*C*b*c*d*f*x*tan(f*x)^4*tan
(e)^4 - 12*A*a*d^2*f*x*tan(f*x)^4*tan(e)^4 + 12*C*a*d^2*f*x*tan(f*x)^4*tan(e)^4 + 12*B*b*d^2*f*x*tan(f*x)^4*ta
n(e)^4 - 6*B*a*c^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan
(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^4*tan(e)^4 - 6*A*b*c^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*ta
n(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^4*tan(e)^4 + 6*C*b*c
^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1
)/(tan(e)^2 + 1))*tan(f*x)^4*tan(e)^4 - 12*A*a*c*d*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)
^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^4*tan(e)^4 + 12*C*a*c*d*log(4*(tan(
f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 +
1))*tan(f*x)^4*tan(e)^4 + 12*B*b*c*d*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 +
tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^4*tan(e)^4 + 6*B*a*d^2*log(4*(tan(f*x)^4*tan(e)^2
- 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^4*
tan(e)^4 + 6*A*b*d^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*t
an(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^4*tan(e)^4 - 6*C*b*d^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*
tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^4*tan(e)^4 - 48*A*
a*c^2*f*x*tan(f*x)^3*tan(e)^3 + 48*C*a*c^2*f*x*tan(f*x)^3*tan(e)^3 + 48*B*b*c^2*f*x*tan(f*x)^3*tan(e)^3 + 96*B
*a*c*d*f*x*tan(f*x)^3*tan(e)^3 + 96*A*b*c*d*f*x*tan(f*x)^3*tan(e)^3 - 96*C*b*c*d*f*x*tan(f*x)^3*tan(e)^3 + 48*
A*a*d^2*f*x*tan(f*x)^3*tan(e)^3 - 48*C*a*d^2*f*x*tan(f*x)^3*tan(e)^3 - 48*B*b*d^2*f*x*tan(f*x)^3*tan(e)^3 + 6*
C*b*c^2*tan(f*x)^4*tan(e)^4 + 12*C*a*c*d*tan(f*x)^4*tan(e)^4 + 12*B*b*c*d*tan(f*x)^4*tan(e)^4 + 6*B*a*d^2*tan(
f*x)^4*tan(e)^4 + 6*A*b*d^2*tan(f*x)^4*tan(e)^4 - 9*C*b*d^2*tan(f*x)^4*tan(e)^4 + 24*B*a*c^2*log(4*(tan(f*x)^4
*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*ta
n(f*x)^3*tan(e)^3 + 24*A*b*c^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*
x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^3*tan(e)^3 - 24*C*b*c^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*
tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^3*tan(e
)^3 + 48*A*a*c*d*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f
*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^3*tan(e)^3 - 48*C*a*c*d*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan
(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^3*tan(e)^3 - 48*B*b*c
*d*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1
)/(tan(e)^2 + 1))*tan(f*x)^3*tan(e)^3 - 24*B*a*d^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)
^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^3*tan(e)^3 - 24*A*b*d^2*log(4*(tan(
f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 +
1))*tan(f*x)^3*tan(e)^3 + 24*C*b*d^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 +
tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^3*tan(e)^3 - 12*C*a*c^2*tan(f*x)^4*tan(e)^3 - 12*
B*b*c^2*tan(f*x)^4*tan(e)^3 - 24*B*a*c*d*tan(f*x)^4*tan(e)^3 - 24*A*b*c*d*tan(f*x)^4*tan(e)^3 + 24*C*b*c*d*tan
(f*x)^4*tan(e)^3 - 12*A*a*d^2*tan(f*x)^4*tan(e)^3 + 12*C*a*d^2*tan(f*x)^4*tan(e)^3 + 12*B*b*d^2*tan(f*x)^4*tan
(e)^3 - 12*C*a*c^2*tan(f*x)^3*tan(e)^4 - 12*B*b*c^2*tan(f*x)^3*tan(e)^4 - 24*B*a*c*d*tan(f*x)^3*tan(e)^4 - 24*
A*b*c*d*tan(f*x)^3*tan(e)^4 + 24*C*b*c*d*tan(f*x)^3*tan(e)^4 - 12*A*a*d^2*tan(f*x)^3*tan(e)^4 + 12*C*a*d^2*tan
(f*x)^3*tan(e)^4 + 12*B*b*d^2*tan(f*x)^3*tan(e)^4 + 72*A*a*c^2*f*x*tan(f*x)^2*tan(e)^2 - 72*C*a*c^2*f*x*tan(f*
x)^2*tan(e)^2 - 72*B*b*c^2*f*x*tan(f*x)^2*tan(e)^2 - 144*B*a*c*d*f*x*tan(f*x)^2*tan(e)^2 - 144*A*b*c*d*f*x*tan
(f*x)^2*tan(e)^2 + 144*C*b*c*d*f*x*tan(f*x)^2*tan(e)^2 - 72*A*a*d^2*f*x*tan(f*x)^2*tan(e)^2 + 72*C*a*d^2*f*x*t
an(f*x)^2*tan(e)^2 + 72*B*b*d^2*f*x*tan(f*x)^2*tan(e)^2 + 6*C*b*c^2*tan(f*x)^4*tan(e)^2 + 12*C*a*c*d*tan(f*x)^
4*tan(e)^2 + 12*B*b*c*d*tan(f*x)^4*tan(e)^2 + 6*B*a*d^2*tan(f*x)^4*tan(e)^2 + 6*A*b*d^2*tan(f*x)^4*tan(e)^2 -
6*C*b*d^2*tan(f*x)^4*tan(e)^2 - 12*C*b*c^2*tan(f*x)^3*tan(e)^3 - 24*C*a*c*d*tan(f*x)^3*tan(e)^3 - 24*B*b*c*d*t
an(f*x)^3*tan(e)^3 - 12*B*a*d^2*tan(f*x)^3*tan(e)^3 - 12*A*b*d^2*tan(f*x)^3*tan(e)^3 + 24*C*b*d^2*tan(f*x)^3*t
an(e)^3 + 6*C*b*c^2*tan(f*x)^2*tan(e)^4 + 12*C*a*c*d*tan(f*x)^2*tan(e)^4 + 12*B*b*c*d*tan(f*x)^2*tan(e)^4 + 6*
B*a*d^2*tan(f*x)^2*tan(e)^4 + 6*A*b*d^2*tan(f*x)^2*tan(e)^4 - 6*C*b*d^2*tan(f*x)^2*tan(e)^4 - 8*C*b*c*d*tan(f*
x)^4*tan(e) - 4*C*a*d^2*tan(f*x)^4*tan(e) - 4*B*b*d^2*tan(f*x)^4*tan(e) - 36*B*a*c^2*log(4*(tan(f*x)^4*tan(e)^
2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^2
*tan(e)^2 - 36*A*b*c^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2
*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^2*tan(e)^2 + 36*C*b*c^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)
^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^2*tan(e)^2 - 72
*A*a*c*d*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(
e) + 1)/(tan(e)^2 + 1))*tan(f*x)^2*tan(e)^2 + 72*C*a*c*d*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + ta
n(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^2*tan(e)^2 + 72*B*b*c*d*log(4
*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e
)^2 + 1))*tan(f*x)^2*tan(e)^2 + 36*B*a*d^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e
)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^2*tan(e)^2 + 36*A*b*d^2*log(4*(tan(f*x)^4*t
an(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(
f*x)^2*tan(e)^2 - 36*C*b*d^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)
^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)^2*tan(e)^2 + 36*C*a*c^2*tan(f*x)^3*tan(e)^2 + 36*B*b*c^2*
tan(f*x)^3*tan(e)^2 + 72*B*a*c*d*tan(f*x)^3*tan(e)^2 + 72*A*b*c*d*tan(f*x)^3*tan(e)^2 - 96*C*b*c*d*tan(f*x)^3*
tan(e)^2 + 36*A*a*d^2*tan(f*x)^3*tan(e)^2 - 48*C*a*d^2*tan(f*x)^3*tan(e)^2 - 48*B*b*d^2*tan(f*x)^3*tan(e)^2 +
36*C*a*c^2*tan(f*x)^2*tan(e)^3 + 36*B*b*c^2*tan(f*x)^2*tan(e)^3 + 72*B*a*c*d*tan(f*x)^2*tan(e)^3 + 72*A*b*c*d*
tan(f*x)^2*tan(e)^3 - 96*C*b*c*d*tan(f*x)^2*tan(e)^3 + 36*A*a*d^2*tan(f*x)^2*tan(e)^3 - 48*C*a*d^2*tan(f*x)^2*
tan(e)^3 - 48*B*b*d^2*tan(f*x)^2*tan(e)^3 - 8*C*b*c*d*tan(f*x)*tan(e)^4 - 4*C*a*d^2*tan(f*x)*tan(e)^4 - 4*B*b*
d^2*tan(f*x)*tan(e)^4 + 3*C*b*d^2*tan(f*x)^4 - 48*A*a*c^2*f*x*tan(f*x)*tan(e) + 48*C*a*c^2*f*x*tan(f*x)*tan(e)
+ 48*B*b*c^2*f*x*tan(f*x)*tan(e) + 96*B*a*c*d*f*x*tan(f*x)*tan(e) + 96*A*b*c*d*f*x*tan(f*x)*tan(e) - 96*C*b*c
*d*f*x*tan(f*x)*tan(e) + 48*A*a*d^2*f*x*tan(f*x)*tan(e) - 48*C*a*d^2*f*x*tan(f*x)*tan(e) - 48*B*b*d^2*f*x*tan(
f*x)*tan(e) - 12*C*b*c^2*tan(f*x)^3*tan(e) - 24*C*a*c*d*tan(f*x)^3*tan(e) - 24*B*b*c*d*tan(f*x)^3*tan(e) - 12*
B*a*d^2*tan(f*x)^3*tan(e) - 12*A*b*d^2*tan(f*x)^3*tan(e) + 24*C*b*d^2*tan(f*x)^3*tan(e) + 12*C*b*c^2*tan(f*x)^
2*tan(e)^2 + 24*C*a*c*d*tan(f*x)^2*tan(e)^2 + 24*B*b*c*d*tan(f*x)^2*tan(e)^2 + 12*B*a*d^2*tan(f*x)^2*tan(e)^2
+ 12*A*b*d^2*tan(f*x)^2*tan(e)^2 - 12*C*b*d^2*tan(f*x)^2*tan(e)^2 - 12*C*b*c^2*tan(f*x)*tan(e)^3 - 24*C*a*c*d*
tan(f*x)*tan(e)^3 - 24*B*b*c*d*tan(f*x)*tan(e)^3 - 12*B*a*d^2*tan(f*x)*tan(e)^3 - 12*A*b*d^2*tan(f*x)*tan(e)^3
+ 24*C*b*d^2*tan(f*x)*tan(e)^3 + 3*C*b*d^2*tan(e)^4 + 8*C*b*c*d*tan(f*x)^3 + 4*C*a*d^2*tan(f*x)^3 + 4*B*b*d^2
*tan(f*x)^3 + 24*B*a*c^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 -
2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)*tan(e) + 24*A*b*c^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3
*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)*tan(e) - 24*C*b*c
^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1
)/(tan(e)^2 + 1))*tan(f*x)*tan(e) + 48*A*a*c*d*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*t
an(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)*tan(e) - 48*C*a*c*d*log(4*(tan(f*x)^4*t
an(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(
f*x)*tan(e) - 48*B*b*c*d*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 -
2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)*tan(e) - 24*B*a*d^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3
*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)*tan(e) - 24*A*b*d
^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1
)/(tan(e)^2 + 1))*tan(f*x)*tan(e) + 24*C*b*d^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*t
an(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1))*tan(f*x)*tan(e) - 36*C*a*c^2*tan(f*x)^2*tan(e) -
36*B*b*c^2*tan(f*x)^2*tan(e) - 72*B*a*c*d*tan(f*x)^2*tan(e) - 72*A*b*c*d*tan(f*x)^2*tan(e) + 96*C*b*c*d*tan(f
*x)^2*tan(e) - 36*A*a*d^2*tan(f*x)^2*tan(e) + 48*C*a*d^2*tan(f*x)^2*tan(e) + 48*B*b*d^2*tan(f*x)^2*tan(e) - 36
*C*a*c^2*tan(f*x)*tan(e)^2 - 36*B*b*c^2*tan(f*x)*tan(e)^2 - 72*B*a*c*d*tan(f*x)*tan(e)^2 - 72*A*b*c*d*tan(f*x)
*tan(e)^2 + 96*C*b*c*d*tan(f*x)*tan(e)^2 - 36*A*a*d^2*tan(f*x)*tan(e)^2 + 48*C*a*d^2*tan(f*x)*tan(e)^2 + 48*B*
b*d^2*tan(f*x)*tan(e)^2 + 8*C*b*c*d*tan(e)^3 + 4*C*a*d^2*tan(e)^3 + 4*B*b*d^2*tan(e)^3 + 12*A*a*c^2*f*x - 12*C
*a*c^2*f*x - 12*B*b*c^2*f*x - 24*B*a*c*d*f*x - 24*A*b*c*d*f*x + 24*C*b*c*d*f*x - 12*A*a*d^2*f*x + 12*C*a*d^2*f
*x + 12*B*b*d^2*f*x + 6*C*b*c^2*tan(f*x)^2 + 12*C*a*c*d*tan(f*x)^2 + 12*B*b*c*d*tan(f*x)^2 + 6*B*a*d^2*tan(f*x
)^2 + 6*A*b*d^2*tan(f*x)^2 - 6*C*b*d^2*tan(f*x)^2 - 12*C*b*c^2*tan(f*x)*tan(e) - 24*C*a*c*d*tan(f*x)*tan(e) -
24*B*b*c*d*tan(f*x)*tan(e) - 12*B*a*d^2*tan(f*x)*tan(e) - 12*A*b*d^2*tan(f*x)*tan(e) + 24*C*b*d^2*tan(f*x)*tan
(e) + 6*C*b*c^2*tan(e)^2 + 12*C*a*c*d*tan(e)^2 + 12*B*b*c*d*tan(e)^2 + 6*B*a*d^2*tan(e)^2 + 6*A*b*d^2*tan(e)^2
- 6*C*b*d^2*tan(e)^2 - 6*B*a*c^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan
(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1)) - 6*A*b*c^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e)
+ tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1)) + 6*C*b*c^2*log(4*(tan(f*x)^4*tan(
e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1)) - 12*A*
a*c*d*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e)
+ 1)/(tan(e)^2 + 1)) + 12*C*a*c*d*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan
(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1)) + 12*B*b*c*d*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e)
+ tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1)) + 6*B*a*d^2*log(4*(tan(f*x)^4*tan
(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1)) + 6*A*
b*d^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e)
+ 1)/(tan(e)^2 + 1)) - 6*C*b*d^2*log(4*(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(
f*x)^2 - 2*tan(f*x)*tan(e) + 1)/(tan(e)^2 + 1)) + 12*C*a*c^2*tan(f*x) + 12*B*b*c^2*tan(f*x) + 24*B*a*c*d*tan(f
*x) + 24*A*b*c*d*tan(f*x) - 24*C*b*c*d*tan(f*x) + 12*A*a*d^2*tan(f*x) - 12*C*a*d^2*tan(f*x) - 12*B*b*d^2*tan(f
*x) + 12*C*a*c^2*tan(e) + 12*B*b*c^2*tan(e) + 24*B*a*c*d*tan(e) + 24*A*b*c*d*tan(e) - 24*C*b*c*d*tan(e) + 12*A
*a*d^2*tan(e) - 12*C*a*d^2*tan(e) - 12*B*b*d^2*tan(e) + 6*C*b*c^2 + 12*C*a*c*d + 12*B*b*c*d + 6*B*a*d^2 + 6*A*
b*d^2 - 9*C*b*d^2)/(f*tan(f*x)^4*tan(e)^4 - 4*f*tan(f*x)^3*tan(e)^3 + 6*f*tan(f*x)^2*tan(e)^2 - 4*f*tan(f*x)*t
an(e) + f)
________________________________________________________________________________________
maple [B] time = 0.03, size = 631, normalized size = 2.37 \[ -\frac {C a \,d^{2} \tan \left (f x +e \right )}{f}+\frac {C b \,d^{2} \left (\tan ^{4}\left (f x +e \right )\right )}{4 f}+\frac {C \left (\tan ^{2}\left (f x +e \right )\right ) a c d}{f}-\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) C a c d}{f}+\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) A a c d}{f}-\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) B b c d}{f}+\frac {2 C \left (\tan ^{3}\left (f x +e \right )\right ) b c d}{3 f}-\frac {B \arctan \left (\tan \left (f x +e \right )\right ) b \,c^{2}}{f}+\frac {A a \,d^{2} \tan \left (f x +e \right )}{f}-\frac {C \left (\tan ^{2}\left (f x +e \right )\right ) b \,d^{2}}{2 f}+\frac {B \left (\tan ^{2}\left (f x +e \right )\right ) a \,d^{2}}{2 f}-\frac {C \arctan \left (\tan \left (f x +e \right )\right ) a \,c^{2}}{f}-\frac {A \arctan \left (\tan \left (f x +e \right )\right ) a \,d^{2}}{f}+\frac {C a \,c^{2} \tan \left (f x +e \right )}{f}+\frac {B b \,c^{2} \tan \left (f x +e \right )}{f}-\frac {B b \,d^{2} \tan \left (f x +e \right )}{f}-\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) A b \,d^{2}}{2 f}+\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) B a \,c^{2}}{2 f}+\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) C b \,d^{2}}{2 f}-\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) C b \,c^{2}}{2 f}+\frac {B \left (\tan ^{3}\left (f x +e \right )\right ) b \,d^{2}}{3 f}+\frac {C \arctan \left (\tan \left (f x +e \right )\right ) a \,d^{2}}{f}+\frac {B \arctan \left (\tan \left (f x +e \right )\right ) b \,d^{2}}{f}+\frac {A \left (\tan ^{2}\left (f x +e \right )\right ) b \,d^{2}}{2 f}-\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) B a \,d^{2}}{2 f}+\frac {2 A b c d \tan \left (f x +e \right )}{f}-\frac {2 C b c d \tan \left (f x +e \right )}{f}+\frac {2 C \arctan \left (\tan \left (f x +e \right )\right ) b c d}{f}+\frac {A \arctan \left (\tan \left (f x +e \right )\right ) a \,c^{2}}{f}+\frac {C \left (\tan ^{3}\left (f x +e \right )\right ) a \,d^{2}}{3 f}+\frac {C \left (\tan ^{2}\left (f x +e \right )\right ) b \,c^{2}}{2 f}+\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) A b \,c^{2}}{2 f}+\frac {B \left (\tan ^{2}\left (f x +e \right )\right ) b c d}{f}+\frac {2 B a c d \tan \left (f x +e \right )}{f}-\frac {2 B \arctan \left (\tan \left (f x +e \right )\right ) a c d}{f}-\frac {2 A \arctan \left (\tan \left (f x +e \right )\right ) b c d}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((a+b*tan(f*x+e))*(c+d*tan(f*x+e))^2*(A+B*tan(f*x+e)+C*tan(f*x+e)^2),x)
[Out]
1/4/f*C*b*d^2*tan(f*x+e)^4-1/f*C*a*d^2*tan(f*x+e)+1/2/f*B*tan(f*x+e)^2*a*d^2-1/f*B*arctan(tan(f*x+e))*b*c^2+1/
f*A*a*d^2*tan(f*x+e)-1/2/f*C*tan(f*x+e)^2*b*d^2-1/f*C*arctan(tan(f*x+e))*a*c^2-1/f*A*arctan(tan(f*x+e))*a*d^2-
1/2/f*ln(1+tan(f*x+e)^2)*A*b*d^2+1/2/f*ln(1+tan(f*x+e)^2)*B*a*c^2-1/2/f*ln(1+tan(f*x+e)^2)*B*a*d^2+1/2/f*A*tan
(f*x+e)^2*b*d^2+1/f*C*a*c^2*tan(f*x+e)+1/2/f*ln(1+tan(f*x+e)^2)*A*b*c^2+1/f*B*b*c^2*tan(f*x+e)-1/f*B*b*d^2*tan
(f*x+e)+1/3/f*C*tan(f*x+e)^3*a*d^2+1/f*C*tan(f*x+e)^2*a*c*d+1/f*C*arctan(tan(f*x+e))*a*d^2+1/2/f*C*tan(f*x+e)^
2*b*c^2+1/f*B*arctan(tan(f*x+e))*b*d^2+1/2/f*ln(1+tan(f*x+e)^2)*C*b*d^2+2/f*A*b*c*d*tan(f*x+e)-1/f*ln(1+tan(f*
x+e)^2)*C*a*c*d-2/f*C*b*c*d*tan(f*x+e)+1/f*ln(1+tan(f*x+e)^2)*A*a*c*d+2/f*C*arctan(tan(f*x+e))*b*c*d+1/f*A*arc
tan(tan(f*x+e))*a*c^2-1/2/f*ln(1+tan(f*x+e)^2)*C*b*c^2+1/3/f*B*tan(f*x+e)^3*b*d^2-1/f*ln(1+tan(f*x+e)^2)*B*b*c
*d+2/3/f*C*tan(f*x+e)^3*b*c*d+2/f*B*a*c*d*tan(f*x+e)-2/f*B*arctan(tan(f*x+e))*a*c*d-2/f*A*arctan(tan(f*x+e))*b
*c*d+1/f*B*tan(f*x+e)^2*b*c*d
________________________________________________________________________________________
maxima [A] time = 0.55, size = 260, normalized size = 0.98 \[ \frac {3 \, C b d^{2} \tan \left (f x + e\right )^{4} + 4 \, {\left (2 \, C b c d + {\left (C a + B b\right )} d^{2}\right )} \tan \left (f x + e\right )^{3} + 6 \, {\left (C b c^{2} + 2 \, {\left (C a + B b\right )} c d + {\left (B a + {\left (A - C\right )} b\right )} d^{2}\right )} \tan \left (f x + e\right )^{2} + 12 \, {\left ({\left ({\left (A - C\right )} a - B b\right )} c^{2} - 2 \, {\left (B a + {\left (A - C\right )} b\right )} c d - {\left ({\left (A - C\right )} a - B b\right )} d^{2}\right )} {\left (f x + e\right )} + 6 \, {\left ({\left (B a + {\left (A - C\right )} b\right )} c^{2} + 2 \, {\left ({\left (A - C\right )} a - B b\right )} c d - {\left (B a + {\left (A - C\right )} b\right )} d^{2}\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right ) + 12 \, {\left ({\left (C a + B b\right )} c^{2} + 2 \, {\left (B a + {\left (A - C\right )} b\right )} c d + {\left ({\left (A - C\right )} a - B b\right )} d^{2}\right )} \tan \left (f x + e\right )}{12 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((a+b*tan(f*x+e))*(c+d*tan(f*x+e))^2*(A+B*tan(f*x+e)+C*tan(f*x+e)^2),x, algorithm="maxima")
[Out]
1/12*(3*C*b*d^2*tan(f*x + e)^4 + 4*(2*C*b*c*d + (C*a + B*b)*d^2)*tan(f*x + e)^3 + 6*(C*b*c^2 + 2*(C*a + B*b)*c
*d + (B*a + (A - C)*b)*d^2)*tan(f*x + e)^2 + 12*(((A - C)*a - B*b)*c^2 - 2*(B*a + (A - C)*b)*c*d - ((A - C)*a
- B*b)*d^2)*(f*x + e) + 6*((B*a + (A - C)*b)*c^2 + 2*((A - C)*a - B*b)*c*d - (B*a + (A - C)*b)*d^2)*log(tan(f*
x + e)^2 + 1) + 12*((C*a + B*b)*c^2 + 2*(B*a + (A - C)*b)*c*d + ((A - C)*a - B*b)*d^2)*tan(f*x + e))/f
________________________________________________________________________________________
mupad [B] time = 9.01, size = 300, normalized size = 1.13 \[ \frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {A\,b\,d^2}{2}+\frac {B\,a\,d^2}{2}+\frac {C\,b\,c^2}{2}-\frac {C\,b\,d^2}{2}+B\,b\,c\,d+C\,a\,c\,d\right )}{f}-x\,\left (A\,a\,d^2-A\,a\,c^2+B\,b\,c^2+C\,a\,c^2-B\,b\,d^2-C\,a\,d^2+2\,A\,b\,c\,d+2\,B\,a\,c\,d-2\,C\,b\,c\,d\right )-\frac {\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )\,\left (\frac {A\,b\,d^2}{2}-\frac {B\,a\,c^2}{2}-\frac {A\,b\,c^2}{2}+\frac {B\,a\,d^2}{2}+\frac {C\,b\,c^2}{2}-\frac {C\,b\,d^2}{2}-A\,a\,c\,d+B\,b\,c\,d+C\,a\,c\,d\right )}{f}+\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (A\,a\,d^2+B\,b\,c^2+C\,a\,c^2-B\,b\,d^2-C\,a\,d^2+2\,A\,b\,c\,d+2\,B\,a\,c\,d-2\,C\,b\,c\,d\right )}{f}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (\frac {B\,b\,d^2}{3}+\frac {C\,a\,d^2}{3}+\frac {2\,C\,b\,c\,d}{3}\right )}{f}+\frac {C\,b\,d^2\,{\mathrm {tan}\left (e+f\,x\right )}^4}{4\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((a + b*tan(e + f*x))*(c + d*tan(e + f*x))^2*(A + B*tan(e + f*x) + C*tan(e + f*x)^2),x)
[Out]
(tan(e + f*x)^2*((A*b*d^2)/2 + (B*a*d^2)/2 + (C*b*c^2)/2 - (C*b*d^2)/2 + B*b*c*d + C*a*c*d))/f - x*(A*a*d^2 -
A*a*c^2 + B*b*c^2 + C*a*c^2 - B*b*d^2 - C*a*d^2 + 2*A*b*c*d + 2*B*a*c*d - 2*C*b*c*d) - (log(tan(e + f*x)^2 + 1
)*((A*b*d^2)/2 - (B*a*c^2)/2 - (A*b*c^2)/2 + (B*a*d^2)/2 + (C*b*c^2)/2 - (C*b*d^2)/2 - A*a*c*d + B*b*c*d + C*a
*c*d))/f + (tan(e + f*x)*(A*a*d^2 + B*b*c^2 + C*a*c^2 - B*b*d^2 - C*a*d^2 + 2*A*b*c*d + 2*B*a*c*d - 2*C*b*c*d)
)/f + (tan(e + f*x)^3*((B*b*d^2)/3 + (C*a*d^2)/3 + (2*C*b*c*d)/3))/f + (C*b*d^2*tan(e + f*x)^4)/(4*f)
________________________________________________________________________________________
sympy [A] time = 0.97, size = 617, normalized size = 2.32 \[ \begin {cases} A a c^{2} x + \frac {A a c d \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{f} - A a d^{2} x + \frac {A a d^{2} \tan {\left (e + f x \right )}}{f} + \frac {A b c^{2} \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} - 2 A b c d x + \frac {2 A b c d \tan {\left (e + f x \right )}}{f} - \frac {A b d^{2} \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {A b d^{2} \tan ^{2}{\left (e + f x \right )}}{2 f} + \frac {B a c^{2} \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} - 2 B a c d x + \frac {2 B a c d \tan {\left (e + f x \right )}}{f} - \frac {B a d^{2} \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {B a d^{2} \tan ^{2}{\left (e + f x \right )}}{2 f} - B b c^{2} x + \frac {B b c^{2} \tan {\left (e + f x \right )}}{f} - \frac {B b c d \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{f} + \frac {B b c d \tan ^{2}{\left (e + f x \right )}}{f} + B b d^{2} x + \frac {B b d^{2} \tan ^{3}{\left (e + f x \right )}}{3 f} - \frac {B b d^{2} \tan {\left (e + f x \right )}}{f} - C a c^{2} x + \frac {C a c^{2} \tan {\left (e + f x \right )}}{f} - \frac {C a c d \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{f} + \frac {C a c d \tan ^{2}{\left (e + f x \right )}}{f} + C a d^{2} x + \frac {C a d^{2} \tan ^{3}{\left (e + f x \right )}}{3 f} - \frac {C a d^{2} \tan {\left (e + f x \right )}}{f} - \frac {C b c^{2} \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {C b c^{2} \tan ^{2}{\left (e + f x \right )}}{2 f} + 2 C b c d x + \frac {2 C b c d \tan ^{3}{\left (e + f x \right )}}{3 f} - \frac {2 C b c d \tan {\left (e + f x \right )}}{f} + \frac {C b d^{2} \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {C b d^{2} \tan ^{4}{\left (e + f x \right )}}{4 f} - \frac {C b d^{2} \tan ^{2}{\left (e + f x \right )}}{2 f} & \text {for}\: f \neq 0 \\x \left (a + b \tan {\relax (e )}\right ) \left (c + d \tan {\relax (e )}\right )^{2} \left (A + B \tan {\relax (e )} + C \tan ^{2}{\relax (e )}\right ) & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((a+b*tan(f*x+e))*(c+d*tan(f*x+e))**2*(A+B*tan(f*x+e)+C*tan(f*x+e)**2),x)
[Out]
Piecewise((A*a*c**2*x + A*a*c*d*log(tan(e + f*x)**2 + 1)/f - A*a*d**2*x + A*a*d**2*tan(e + f*x)/f + A*b*c**2*l
og(tan(e + f*x)**2 + 1)/(2*f) - 2*A*b*c*d*x + 2*A*b*c*d*tan(e + f*x)/f - A*b*d**2*log(tan(e + f*x)**2 + 1)/(2*
f) + A*b*d**2*tan(e + f*x)**2/(2*f) + B*a*c**2*log(tan(e + f*x)**2 + 1)/(2*f) - 2*B*a*c*d*x + 2*B*a*c*d*tan(e
+ f*x)/f - B*a*d**2*log(tan(e + f*x)**2 + 1)/(2*f) + B*a*d**2*tan(e + f*x)**2/(2*f) - B*b*c**2*x + B*b*c**2*ta
n(e + f*x)/f - B*b*c*d*log(tan(e + f*x)**2 + 1)/f + B*b*c*d*tan(e + f*x)**2/f + B*b*d**2*x + B*b*d**2*tan(e +
f*x)**3/(3*f) - B*b*d**2*tan(e + f*x)/f - C*a*c**2*x + C*a*c**2*tan(e + f*x)/f - C*a*c*d*log(tan(e + f*x)**2 +
1)/f + C*a*c*d*tan(e + f*x)**2/f + C*a*d**2*x + C*a*d**2*tan(e + f*x)**3/(3*f) - C*a*d**2*tan(e + f*x)/f - C*
b*c**2*log(tan(e + f*x)**2 + 1)/(2*f) + C*b*c**2*tan(e + f*x)**2/(2*f) + 2*C*b*c*d*x + 2*C*b*c*d*tan(e + f*x)*
*3/(3*f) - 2*C*b*c*d*tan(e + f*x)/f + C*b*d**2*log(tan(e + f*x)**2 + 1)/(2*f) + C*b*d**2*tan(e + f*x)**4/(4*f)
- C*b*d**2*tan(e + f*x)**2/(2*f), Ne(f, 0)), (x*(a + b*tan(e))*(c + d*tan(e))**2*(A + B*tan(e) + C*tan(e)**2)
, True))
________________________________________________________________________________________